home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
inkey4c.zip
/
INKEY.H
< prev
next >
Wrap
Text File
|
1993-03-16
|
8KB
|
226 lines
/* ********************************************************************* */
/* */
/* INKEY.H version 1.0 */
/* */
/* ********************************************************************* */
/* Copyright 1993 by John H. Traphofner, Esq. */
/* */
/* ********************************************************************* */
#define EXTENDED +256
#define STATUS 512
#define KEY_101_TEST STATUS
#define READ_KEY 0
unsigned int KEY_WAIT=2048; /* GLOBAL KEY_WAIT variable */
unsigned int inkey(unsigned int jht_keypress);
/* The Status functions 1-8 are available on all keyboards. */
/* Status functions 9-16 are only available on 101 keyboards. */
/* Use inkey(STATUS) to determine type of keyboard. */
#define ALT_PRESSED ( 1+STATUS)
#define CTRL_PRESSED ( 2+STATUS)
#define LSHIFT_PRESSED ( 3+STATUS)
#define RSHIFT_PRESSED ( 4+STATUS)
#define SHIFT_PRESSED ( 5+STATUS)
#define INS_ON ( 6+STATUS)
#define CAPSLOCK_ON ( 7+STATUS)
#define NUMLOCK_ON ( 8+STATUS)
#define SYSREQ_PRESSED ( 9+STATUS)
#define CAPSLOCK_PRESSED (10+STATUS)
#define NUMLOCK_PRESSED (11+STATUS)
#define SCROLL_PRESSED (12+STATUS)
#define R_ALT_PRESSED (13+STATUS)
#define R_CTRL_PRESSED (14+STATUS)
#define L_ALT_PRESSED (15+STATUS)
#define L_CTRL_PRESSED (16+STATUS)
#define ALT_ESC 1 EXTENDED
#define CTRL_A 1
#define CTRL_B 2
#define BREAK_KEY 3
#define CTRL_@ 3 EXTENDED
#define CTRL_C 3
#define CTRL_D 4
#define CTRL_E 5
#define CTRL_F 6
#define CTRL_G 7
#define CTRL_H 8
#define BACKSPACE 8
#define TAB 9
#define CTRL_I 9
#define CTRL_J 10
#define CTRL_K 11
#define CTRL_L 12
#define CTRL_M 13
#define ENTER 13
#define ALT_BACK 14 EXTENDED
#define CTRL_N 14
#define SHIFT_TAB 15 EXTENDED
#define CTRL_O 15
#define ALT_Q 16 EXTENDED
#define CTRL_P 16
#define ALT_W 17 EXTENDED
#define CTRL_Q 17
#define ALT_E 18 EXTENDED
#define CTRL_R 18
#define ALT_R 19 EXTENDED
#define CTRL_S 19
#define ALT_T 20 EXTENDED
#define CTRL_T 20
#define ALT_Y 21 EXTENDED
#define CTRL_U 21
#define ALT_U 22 EXTENDED
#define CTRL_V 22
#define ALT_I 23 EXTENDED
#define CTRL_W 23
#define ALT_O 24 EXTENDED
#define CTRL_X 24
#define ALT_P 25 EXTENDED
#define CTRL_Y 25
#define ALT_LBRACKET 26 EXTENDED
#define CTRL_Z 26
#define ALT_RBRACKET 27 EXTENDED
#define ESC 27
#define CTRL_LBRACKET 27
#define ALT_ENTER 28 EXTENDED
#define CTRL_BACKSLASH 28
#define CTRL_RBRACKET 29
#define ALT_A 30 EXTENDED
#define CTRL_CARAT 30
#define ALT_S 31 EXTENDED
#define CTRL__ 31
#define ALT_D 32 EXTENDED
#define SPACEBAR 32
#define ALT_F 33 EXTENDED
#define ALT_G 34 EXTENDED
#define ALT_H 35 EXTENDED
#define ALT_J 36 EXTENDED
#define ALT_K 37 EXTENDED
#define ALT_L 38 EXTENDED
#define ALT_SEMICOLON 39 EXTENDED
#define ALT_APOSTROPHE 40 EXTENDED
#define ALT_ACCENT 41 EXTENDED
#define ALT_BSLASH 43 EXTENDED
#define ALT_Z 44 EXTENDED
#define ALT_X 45 EXTENDED
#define ALT_C 46 EXTENDED
#define ALT_V 47 EXTENDED
#define ALT_B 48 EXTENDED
#define ALT_N 49 EXTENDED
#define ALT_M 50 EXTENDED
#define ALT_COMMA 51 EXTENDED
#define ALT_PERIOD 52 EXTENDED
#define ALT_SLASH 53 EXTENDED
#define ALT_ASTERIK 55 EXTENDED
#define ALT_BREAK 56 EXTENDED
#define CAPSLOCK 58 EXTENDED /* To catch this press use STATUS */
#define F1 59 EXTENDED
#define F2 60 EXTENDED
#define F3 61 EXTENDED
#define F4 62 EXTENDED
#define F5 63 EXTENDED
#define F6 64 EXTENDED
#define F7 65 EXTENDED
#define F8 66 EXTENDED
#define F9 67 EXTENDED
#define F10 68 EXTENDED
#define NUMLOCK 69 EXTENDED /* To catch this press use STATUS */
#define SCROLL_LOCK 70 EXTENDED /* To catch this press use STATUS */
#define HOME 71 EXTENDED
#define UP 72 EXTENDED
#define PGUP 73 EXTENDED
#define ALT_NUM_MINUS 74 EXTENDED
#define LEFT 75 EXTENDED
#define CENTER 76 EXTENDED
#define RIGHT 77 EXTENDED
#define ALT_NUM_PLUS 78 EXTENDED
#define END 79 EXTENDED
#define DOWN 80 EXTENDED
#define PGDN 81 EXTENDED
#define INS 82 EXTENDED
#define DEL 83 EXTENDED
#define SHIFT_F1 84 EXTENDED
#define SHIFT_F2 85 EXTENDED
#define SHIFT_F3 86 EXTENDED
#define SHIFT_F4 87 EXTENDED
#define SHIFT_F5 88 EXTENDED
#define SHIFT_F6 89 EXTENDED
#define SHIFT_F7 90 EXTENDED
#define SHIFT_F8 91 EXTENDED
#define SHIFT_F9 92 EXTENDED
#define SHIFT_F10 93 EXTENDED
#define CTRL_F1 94 EXTENDED
#define CTRL_F2 95 EXTENDED
#define CTRL_F3 96 EXTENDED
#define CTRL_F4 97 EXTENDED
#define CTRL_F5 98 EXTENDED
#define CTRL_F6 99 EXTENDED
#define CTRL_F7 100 EXTENDED
#define CTRL_F8 101 EXTENDED
#define CTRL_F9 102 EXTENDED
#define CTRL_F10 103 EXTENDED
#define ALT_F1 104 EXTENDED
#define ALT_F2 105 EXTENDED
#define ALT_F3 106 EXTENDED
#define ALT_F4 107 EXTENDED
#define ALT_F5 108 EXTENDED
#define ALT_F6 109 EXTENDED
#define ALT_F7 110 EXTENDED
#define ALT_F8 111 EXTENDED
#define ALT_F9 112 EXTENDED
#define ALT_F10 113 EXTENDED
#define CTRL_PRINT 114 EXTENDED
#define CTRL_LEFT 115 EXTENDED
#define CTRL_RIGHT 116 EXTENDED
#define CTRL_END 117 EXTENDED
#define CTRL_PGDN 118 EXTENDED
#define CTRL_HOME 119 EXTENDED
#define ALT_1 120 EXTENDED
#define ALT_2 121 EXTENDED
#define ALT_3 122 EXTENDED
#define ALT_4 123 EXTENDED
#define ALT_5 124 EXTENDED
#define ALT_6 125 EXTENDED
#define ALT_7 126 EXTENDED
#define ALT_8 127 EXTENDED
#define DELETE 127
#define ALT_9 128 EXTENDED
#define ALT_0 129 EXTENDED
#define ALT_MINUS 130 EXTENDED
#define ALT_EQUAL 131 EXTENDED
#define CTRL_PGUP 132 EXTENDED
#define F11 133 EXTENDED
#define F12 134 EXTENDED
#define SHIFT_F11 135 EXTENDED
#define SHIFT_F12 136 EXTENDED
#define CTRL_F11 137 EXTENDED
#define CTRL_F12 138 EXTENDED
#define ALT_F11 139 EXTENDED
#define ALT_F12 140 EXTENDED
#define CTRL_UP 141 EXTENDED
#define CTRL_NUM_MINUS 142 EXTENDED
#define CTRL_NUM_PLUS 144 EXTENDED
#define CTRL_DOWN 145 EXTENDED
#define CTRL_INS 146 EXTENDED
#define CTRL_DEL 147 EXTENDED
#define CTRL_NUM_SLASH 149 EXTENDED
#define CTRL_NUM_ASTERICK 150 EXTENDED
#define ALT_HOME 151 EXTENDED
#define ALT_UP 152 EXTENDED
#define ALT_PGUP 153 EXTENDED
#define ALT_LEFT 155 EXTENDED
#define ALT_RIGHT 157 EXTENDED
#define ALT_END 159 EXTENDED
#define ALT_DOWN 160 EXTENDED
#define ALT_PGDN 161 EXTENDED
#define ALT_INS 162 EXTENDED
#define ALT_DEL 163 EXTENDED
#define ALT_NUM_SLASH 164 EXTENDED
#define ALT_TAB 165 EXTENDED
#define ALT_NUM_ENTER 166 EXTENDED